qr — QR decomposition


\begin{rail}
QR : 'qr' '(' Matrix ( ',' '''p''')? ')' ;
\end{rail}
qr computes the QR decomposition of the argument matrix, returning a list with two elements q and r. These are the Q and R matrices, such that, for an argument matrix of A:

A = QR

If the optional argument "p" is used, column pivoting is used, with the permutation matrix returned in the list result as p, such that for a permutation matrix P,

AP = QR

Q will have orthogonal columns, and R will be upper-triangular.

Subsections